package com.borya.util;

import java.io.File;

public interface Constant {

	static String getProperty(String propName) {
		return SystemConfig.getInstance().getProperty(propName);
	}

	static Long getLong(String propName) {
		return Long.valueOf(getProperty(propName));
	}

	static Integer getInteger(String propName) {
		return Integer.valueOf(getProperty(propName));
	}

	int TMSI_EXPIRED_HOUR = getInteger("user.tmsi.expired.hours");

	long SMS_TIMEOUT = getLong("sms.timeout.millis");

	int remove_with_account = getInteger("remove_with_account");
	String MSG_INGO = getProperty("msginfo");

	String GET_DEALERID_URL = getProperty("get_dealerid_url");
	// String https_cer_path = getProperty("https_cer_path");
	String receiver = getProperty("model_order_receiver");
	String ums_url = getProperty("ums_url");

	long CREDITVALITTIME = getLong("credit_valit_time") * 24 * 60 * 60 * 1000;
	long model_protect_time = getLong("model_protect_time") * 60 * 1000;

    //卡盟侧注册成功后开启活体识别的方式
    String KAMENG_LIVING_STATUS_INIT_VALUE = getProperty("kameng.living.status.init.value");

	String IMG_SAVE_PATH = getProperty("img_save_path");
	String DEFAULT_IMG_SAVE_SUBPATH = "/registing/imgEdit/";

	String IP_VALIDATION = getProperty("ip_validation");

	int SMS_TIMEOUT_SECOND = getInteger("sms.timeout.second");
	int PAGE_TIMEOUT = getInteger("sms.timeout.page");
	int USER_TIMEOUT = getInteger("user.timeout");

	String RESOURCE_AUTO_TASK = getProperty("resource.auto.time");

	String IMAGE_AUTOREMOVE_TIME = getProperty("image.autoRemove.time");

	String BOOTSTRAP_SERVERS = getProperty("kafka.bootstrap.servers");
	String TOPIC = getProperty("kafka.bootstrap.topic");
	// ors网元访问地址
	String ORS_URL = getProperty("ors.project.url");

	float WATERMARK_ALPHA = Float.parseFloat(getProperty("watermark.alpha"));
	/*** 测试or生产环境 ***/
	boolean PROD_ENV = getInteger("env.current") == 1;

	public interface SourceType {
		int KAMENG = 1;
		int XINIU = 2;
	}

	interface DetailType {
		int XINIU = 2;
	}

	/** 授权牌 **/
	interface SpecialTag {
		String SHQP = File.separator + "shqp" + File.separator;
		String SOURCE = File.separator + "source" + File.separator;
		String ASKPOWER = File.separator + "askpower" + File.separator;
		String SIGN = File.separator + "sign" + File.separator;

	}

	String SHQP_MSG_START = getProperty("shqp_msg_start");

	/** tb_message_notice **/
	public interface MsgType {
		int TYPE1 = 1;// 业务(开卡)
		int TYPE2 = 2;// 账户（积分兑换）
		int TYPE3 = 3;// 充值 （代充）
		int TYPE4 = 4;// 激励（送）
		int TYPE5 = 5;// 开卡/激活尝试(订单生成)
		int TYPE6 = 6;// 注册
		int TYPE7 = 7;// 激活
		int TYPE8 = 8;// 话费充值
		int TYPE9 = 9;// 流量充值
		int TYPE10 = 10;// 实名补录
		int TYPE11 = 11;// 补换卡
		int TYPE12 = 12;// 过户
		int TYPE13 = 13;// 制卡
		int TYPE14 = 14;// 喜牛购买设备
		int TYPE15 = 15;// 卡盟购买设备
		int TYPE16 = 16;// 预占
		int TYPE17 = 17;// 流转
		int TYPE18 = 18;// 提现
		int TYPE19 = 19;// 佣金转账户
		int TYPE20 = 20;// 账户充值
	}

	/** 基础模式 **/
	String BASEMODEL = "basemodel";

	/**
	 * 1通过2拒绝3待分配4已分配5等待自动审核6复审通过
	 * 
	 * @author Administrator
	 *
	 */
	public interface RegisterAuditOrderStatus {
		int SUCCESS = 1;
		int FAILED = 2;
		int WAIT_ALLOT = 3;
		int ALREADY_ALLOT = 4;
		int WAIT_AUDIT = 5;

	}

	/**
	 * 商户实名补录订单前缀
	 */
	String MERCHANT_ORDER_PREFIX = "MBL";
	/**
	 * 商户资料完善订单前缀
	 */
	String MERCHANT_PERFECTION_PREFIX = "MDP";

	interface ApiConf {
		String BAIDU_MAP_APK = getProperty("baidu.map.apk");
	}

	String IPS = "ka_meng:s2sips:list";

	/**
	 * 商户资料补充过期时间
	 **/
	int AUDIT_EXPIRE_TIME = getInteger("audit.expire.time");

	/**
	 * 上传图片储存地址,测试环境test4borya,正式环境datayuantel
	 **/
	String ROOT_BACKET_NAME = getProperty("root.backet.name");

	/**
	 * 活体识别最低相似度
	 **/
	String LIMIT_SIMILARITY = getProperty("limitSimilarity");

	/**
	 * 用户登录时是否开启资料完善强制开关，1开启，2不开启
	 **/
	String PERFECTION_SWITCH = getProperty("perfection.switch");

	/** 测试环境 **/
	boolean IS_TEST = false;

	/**
	 * 商户激活、商户补录、商户资料完善 版本兼容性配置
	 */
	String MERCHANT_OPERATION_KA_MENG_IOS = getProperty("app.merchant.operation.ka.meng.ios");
	String MERCHANT_OPERATION_KA_MENG_ANDROID = getProperty("app.merchant.operation.ka.meng.android");
	String MERCHANT_OPERATION_XI_NIU_IOS = getProperty("app.merchant.operation.xi.niu.ios");
	String MERCHANT_OPERATION_XI_NIU_ANDROID = getProperty("app.merchant.operation.xi.niu.android");
	String MERCHANT_OPERATION_YI_JIA_IOS = getProperty("app.merchant.operation.yi.jia.ios");
	String MERCHANT_OPERATION_YI_JIA_ANDROID = getProperty("app.merchant.operation.yi.jia.android");
	String MERCHANT_OPERATION_QUAN_WANG_TONG_IOS = getProperty("app.merchant.operation.quan.wang.tong.ios");
	String MERCHANT_OPERATION_QUAN_WANG_TONG_ANDROID = getProperty("app.merchant.operation.quan.wang.tong.android");
	String MERCHANT_OPERATION_JU_LIAN_IOS = getProperty("app.merchant.operation.ju.lian.ios");
	String MERCHANT_OPERATION_JU_LIAN_ANDROID = getProperty("app.merchant.operation.ju.lian.android");

	boolean EXTENSION_FLAG = getInteger("extension.after.active.flag") == 1;

    /**
     * 工号管理 温馨提示
     */
    String HINT_CONT = getProperty("hint.cont");

    /**
     * 添加子工号订单前缀
     */
    String ADD_JOB_NUM = "AJN";

    /**
     * 企业可添加工号的数量（包括在途、主工号）
     */
    int COMPANY_SON_JOB_NUM_COUNT = getInteger("company.son.job.num.count");

    /**
     * 个人可添加工号的数量（包括在途、主工号）
     */
    int PERSONAL_SON_JOB_NUM_COUNT = getInteger("personal.son.job.num.count");

    /**
     * 个人身份证可激活用户数量
     */
    int PERSONAL_IDENTITY_REGISTER_COUNT = getInteger("personal.identity.register.count");

    /**
     * 企业身份证可激活用户数量
     */
    int COMPANY_IDENTITY_REGISTER_COUNT = getInteger("company.identity.register.count");

    /**
     * 企业营业执照可激活用户数量
     */
    int COMPANY_BUSINESS_LICENSE_REGISTER_COUNT = getInteger("company.business.license.register.count");

    /**
     * 上传图片配置:1支持拍照,2支持图片选择,3都支持
     */
    String UPLOAD_IMG_CONFIG = getProperty("upload.img.config");

    /**
     * 国政通开关：1做，2不做
     */
    int DO_GZT = getInteger("son.job.num.gzt");
}
